package com.example.customviewpager;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {

    private CustomViewpager mCustomViewpager;
    private ArrayList mShowItems = new ArrayList();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mShowItems.add(R.mipmap.guide_1);
        mShowItems.add(R.mipmap.guide_2);
        mShowItems.add(R.mipmap.guide_3);
        init();
    }

    private void init() {
        mCustomViewpager = (CustomViewpager) findViewById(R.id.viewpager);

        CustomAdapter customAdapter = new CustomAdapter(this, mShowItems,mCustomViewpager);
        mCustomViewpager.setAdapter(customAdapter);

    }
}
